package com.hzit.controller;

import com.hzit.entity.R;
import com.hzit.service.IClassesService;
import com.hzit.service.impl.ClassesServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hbxfwf
 * @since 2023-05-25
 */
@RestController
@RequestMapping("/classes")
public class ClassesController {
	@Autowired
	private IClassesService classesService;
	//1. 查询所有班级
	@GetMapping("/list")
	public R list(){
		return R.ok().data("list",classesService.list());
	}
}
